<?php
class Model_Mediate_CaseLitigant extends Model_BaseModel
{
    use Lib_BaseTraits;
    /**
     * 缓存前缀
     *
     * @var unknown
     */
    private static $tag = 'Model_Mediate_CaseLitigant';
    /**
     * Undocumented variable.
     *
     * @var string
     */
    private $table = 'case_litigant';

    public function __construct()
    {
        // 选择连接的数据库
        parent::_init('mediation');
    }

    public function updateMobileStatusByCardIDMobile($mobileStatus,$cardId,$mobile){
        $sql =  "UPDATE `case_litigant` SET mobileStatus = :mobileStatus where cardId = :cardId and telephone=:telephone";
        
        return  $this->dao->conn(false)->noCache()->preparedSql($sql, [
            ':mobileStatus'=>$mobileStatus,
            ':cardId'=>$cardId,
            ':telephone'=>$mobile,
        ])->affectedCount();
    }
}
